IF OBJECT_ID('ssf.ptx_get_active_task_children') IS NOT NULL
	DROP FUNCTION ssf.ptx_get_active_task_children
GO

CREATE FUNCTION ssf.ptx_get_active_task_children (
	@task_id INT
)
RETURNS TABLE
AS
/*
<object_header>

<object_summary>
	<purpose><![CDATA[

	]]></purpose>
</object_summary>

</object_header>
*/

	RETURN (
		SELECT task_id
		FROM ssf.ptx_task_dependency WITH (NOLOCK)
		WHERE depends_on_task_id = @task_id
		AND active_fl = 1
	)
GO
